﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>@ViewBag.Title</title>
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")
</head>
<body>
    <ul>
        @if (User.Identity.IsAuthenticated)
        { 
            <li>
                Hello, @Html.ActionLink(
                User.Identity.Name, "Manage", "Account", routeValues: null,
                htmlAttributes: new { @class = "username", title = "Manage" }) 
                [@string.Join(",", Roles.GetRolesForUser(User.Identity.Name))]

        @using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm" }))
        {
            @Html.AntiForgeryToken()
            <a href="javascript:document.getElementById('logoutForm').submit()">Log off</a>
        }
            </li>
        }
        else
        {
            <li>
                @Html.ActionLink("Register", "Register", "Account")
            </li>
        }
        <li>
            @Html.ActionLink("Log in", "Login", "Account")
        </li>
    </ul>

    @RenderBody()

    @Scripts.Render("~/bundles/jquery")
    @RenderSection("scripts", required: false)
</body>
</html>
